<template>

	<el-main style="padding:0 20px;">
		<el-descriptions :column="1" border size="small">
			<el-descriptions-item label="token">{{data.token}}</el-descriptions-item>
			<el-descriptions-item label="用户名">{{data.username}}</el-descriptions-item>
			<el-descriptions-item label="租户名称">{{data.tenantTitle}}</el-descriptions-item>
			<el-descriptions-item label="登录时间">{{data.loginTime}}</el-descriptions-item>
			<el-descriptions-item label="ip">{{data.ip}}</el-descriptions-item>
			<el-descriptions-item label="设备类型">{{data.device}}</el-descriptions-item>
		</el-descriptions>
		<el-collapse v-model="activeNames" style="margin-top: 20px;">
			<el-collapse-item title="缓存明细" name="1">
				<el-descriptions :column="1" border size="small">
					<el-descriptions-item label="用户信息">{{data.userInfo}}</el-descriptions-item>
				</el-descriptions>
			</el-collapse-item>
		</el-collapse>
	</el-main>
</template>

<script>
	export default {
		data() {
			return {
				data: {},
				activeNames: ['1'],
				typeMap: {
					'info': "info",
					'warn': "warning",
					'error': "error"
				}
			}
		},
		methods: {
			setData(data){
				this.data = data
			}
		}
	}
</script>

<style scoped>
	.code {background: #848484;padding:15px;color: #fff;font-size: 12px;border-radius: 4px;}
</style>
